<!DOCTYPE HTML>
<html>
	<head>
		<title>shift加回车提交</title>
		<meta charset="utf-8">
		<script>
			window.onload=function(){
				var oTxt1=document.getElementById('txt1');
				var oTxt2=document.getElementById('txt2');
				oTxt1.onkeydown=function(ev){
					var oEvent=ev||event;
					//alert(oEvent.keyCode);
					if(oEvent.keyCode==13 &&oEvent.shiftKey)
					{
						oTxt2.value+=oTxt1.value+'\n';
						oTxt1.value='';
					}
				}

			}
		</script>
	</head>
	<body>
		<input type="text" id="txt1" name="留言">
		<textarea type="text" id="txt2" name="留言板" rows="5" cols="20"></textarea>
	</body>
</html>